home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.m68k
- Path: news.ridgecrest.ca.us!usenet
- From: mojaveg@ridgecrest.ca.us (Everett M. Greene)
- Subject: Re: CPU32 assembler question
- X-Nntp-Posting-Host: annex038
- Content-Type: text/plain; charset=iso-8859-1
- Message-ID: <19960223.7D79040.8E25@mojaveg.ridgecrest.ca.us>
- Sender: usenet@ridgecrest.ca.us (Ridgenet Usenet admin)
- Content-Transfer-Encoding: 8bit
- Organization: none that you'd notice
- X-Newssoftware: GRn 2.1 Feb 19, 1994
- References: <4g9cfa$7h3@news.onramp.net> <31288025.61CA@minn.net>
- Mime-Version: 1.0
- Date: Fri, 23 Feb 1996 17:25:49 GMT
-
- In article <31288025.61CA@minn.net> Michael Carland <mgc@minn.net> writes:
- > Shay Collins wrote:
- > > when I do the following:
- > > ori.b #$55,($1234,a0)
- > > the assembler generates:
- > > 0000310a 0028 0055 1234 ori.b #$55,($1234,a0)
- > > Now, when I do the following:
- > > ori.b #$55,($9000,a0)
- > > the assembler generates:
- > > 00003116 0030 0055 0170 ori.b #$55,($9000,a0)
- > > 0000 9000
- > > The instructions it generates are not what I would expect. It
- > > generates a mode 6 ori.b with a 32 bit displacement. I would
- > > expect the assembler to generate instructions similar to the
- > > first example since there should be no difference.
-
- > This would make sense to me if these instructions generated
- > 00003116 0030 0055 0170 ori.b #$55,($9000,a0)
- > ffff 9000
- > since $9000 should be sign extended to $ffff9000. Try using
- > ($9000.b,a0), ($09000,a0) or some similar notation.
-
- This is an example of syntactical ambiguity in ASM. The $9000
- is presumed to be a positive value since you didn't say -$7000.
- Since +$9000 won't fit in 16 its, the assembler went to a 32-bit
- offset (and you'd better be executing on a 68020+).
-
- -----------------------------------------------------------------------
- Everett M. Greene (The Mojave Greene, crotalus scutulatus scutulatus)
- Ridgecrest, Ca. 93555 Path: mojaveg@ridgecrest.ca.us
-